package sun.sequence.feign;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import sun.sequence.data.Result;

import java.util.List;

public interface BusinessNoFeignFeign {

    @GetMapping("/inner/businessNo/genId")
    Result<Long> genBusinessNo(@RequestParam("namespace") String namespace,
                               @RequestParam("bizTag") String bizTag);


    @GetMapping("/inner/businessNo/batchGenId")
    Result<List<Long>> batchGenBusinessNo(@RequestParam("namespace") String namespace,
                                          @RequestParam("bizTag") String bizTag,
                                          @RequestParam("batchSize") Integer batchSize);


    @PostMapping("/inner/businessNo/initBusinessNo")
    Result<Object> initBusinessNo(@RequestParam("namespace") String namespace,
                                  @RequestParam("bizTag") String bizTag,
                                  @RequestParam("initVal") Long initVal,
                                  @RequestParam("step") Integer step,
                                  @RequestParam("description") String description);
}
